<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/12/15 0015
 * Time: 9:55
 */

namespace Cohuna\Models;

/**
 * 海关报关表
 * @package Cohuna\Models
 */
class CohunaCustoms extends ModelBase
{
    public $customs_id;
    public $out_request_no;
    public $order_no;
    public $sub_order_no;
    public $merchant_id;
    public $transaction_id;
    public $merchant_customs_name;
    public $merchant_customs_code;
    public $e_commerce_code;
    public $e_commerce_name;
    public $amount;
    public $transport_fee;
    public $duty;
    public $customs_place;
    public $buyer_name;
    public $buyer_id_no;
    public $pay_company_code;
    public $push_time;
    public $push_result;
    public $response;
    public $request;
    public $create_time;
    public $update_time;

    public function getSource()
    {
        return $this->config->database->default->prefix . 'customs';
    }
    public function beforeUpdate()
    {
        $this->update_time = date('Y-m-d H:i:s');
    }
    public function beforeCreate()
    {
        $this->create_time = date('Y-m-d H:i:s');
    }
}